import request from '@/utils/request.js'
// 8081
import {cosnt} from './env';
// 8080
import {thislistindo} from './env'

// 8081
// let cosnt = 'https://t.api.huiweij.com/cms'

// // 8080
// let thislistindo = 'https://t.api.huiweij.com/front/api/v1'
// 装修知识列表 8080
export function fitment(data){
  return request({
   url:thislistindo + '/community/article/knowledge/list',
   method:'post',
   data
  })
}

// 新增装修知识 8080
export function addfitment(data){
  return request({
   url:thislistindo + '/community/article/action/add/knowledge',
   method:'post',
   
   data
  })
}
// 装修知识分类
export function addfit(data){
  return request({
   url:thislistindo + '/community/article/knowledge/category',
   method:'get',
   data
  })
}
// 装修避坑列表 8080 
export function updateRole(data){
  return request({
   url:thislistindo + '/community/article/misunderstanding/list',
   method:'post',
   data
  })
}
// 新增装修避坑 8080 
export function addteRole(data){
  return request({
   url:thislistindo + '/community/article/action/add/misunderstanding',
   method:'post',
   headers: { // 设置请求头
    'Content-Type': 'application/json'
  },
   data,

  })
}
// 新增经典案例8080
export function addroutrl(data){
  return request({
   url:thislistindo + '/community/article/action/add/classic-case',
   method:'post',
   headers: { // 设置请求头
    'Content-Type': 'application/json'
  },
   data,

  })
}
// 编辑文章
export function addroutrech(data){
  return request({
   url:thislistindo + '/community/article/action/cms/update',
   method:'post',
   headers: { // 设置请求头
    'Content-Type': 'application/json'
  },
   data,
  })
}
// 编辑经典案例
export function redactknowledge(data){
  return request({
   url:thislistindo + '/community/article/action/cms/update/classic-case',
   method:'post',
   headers: { // 设置请求头
    'Content-Type': 'application/json'
  },
   data,
  })
}
// 删除经典案例
export function tailuo(data){
  return request({
   url:thislistindo + '/community/article/action/cms/remove',
   method:'post',

   data,

  })
}
// 经典案例列表8080
export function roulescard(data){
  return request({
   url:thislistindo + '/community/article/classic-case/list',
   method:'post',
   data,

  })
}
// 装修上架 8080
export function addenche(data){
  return request({
   url:thislistindo + '/community/article/action/shelve',
   method:'post',
   headers: { // 设置请求头
    'Content-Type': 'application/x-www-form-urlencoded'
  },
   data,

  })
}
// 装修下架 8080
export function addrolled(data){
  return request({
   url:thislistindo + '/community/article/action/offline',
   method:'post',
   headers: { // 设置请求头
    'Content-Type': 'application/x-www-form-urlencoded'
  },
   data,

  })
}
// 用户作品审核列表 8080 
export function getUserInfo(data){
  return request({
   url:thislistindo + '/community/article/audit/list',
   method:'post',
   data
  })
}
// 用户作品审核通过 8080
export function getdatalist(data){
  return request({
   url:thislistindo + '/community/article/audit/pass',
   method:'post',
   data,
      headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
// 用户作品审核拒绝
export function getdatadestet(data){
  return request({
   url:thislistindo + '/community/article/audit/reject',
   method:'post',
   data,
      headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 订单列表 8080
export function userlogin(data){
  return request({
   url:thislistindo + '/order/list/supplier',
   method:'post',
   data
  })
}
// 订单列表确定发货 8080
export function userdeliver(data){
  return request({
   url:thislistindo + '/order/status/confirm/delivery',
   method:'post',
   data, 
    headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
// 订单详细 8080 
export function userparticular(data){
  return request({
   url:thislistindo + '/order/supplier/detail',
   method:'post',
   data,  headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
// 提现待审核列表 8080 
export function userwithdraw(data){
  return request({
   url:thislistindo + '/wallet/audit/list',
   method:'post',
   data
  })
}
// 提现列表同意8080
export function userconsent(data){
  return request({
   url:thislistindo + '/wallet/audit/to-account',
   method:'post',
   data,
   headers: { // 设置请求头
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  })
}
// 提现列表拒绝 8080
export function userassignment(data){
  return request({
   url:thislistindo + '/wallet/audit/reject',
   method:'post',
   data,
   headers: { // 设置请求头
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  })
}
// 财务管理 8080
export function userfinance(data){
  return request({
   url:thislistindo + '/order/list/subOrder/count',
   method:'post',
   data
  })
}

// 退货列表
export function refund(data){
  return request({
    url:thislistindo + '/order/refund/list/shop',
    method:'post',
    data
  })
}

// 退货同意
export function xconsent(data){
  return request({
    url:thislistindo + '/order/refund/general/audit/pass',
    method:'post',
    data,
    headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 退货拒绝
export function xhoder(data){
  return request({
    url:thislistindo + '/order/refund/general/audit/reject',
    method:'post',
    data,
    headers: { // 设置请求头
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}